//
//  UICutter.h
//  cutter
//
//  Created by mac on 15/12/8.
//  Copyright © 2015年 e360. All rights reserved.
//
#import "TMCutterLayer.h"

//
@interface TMCutter : UIView <TMCutterLayerDelegate>
@property(nonatomic, assign) CGFloat offsetX;
@property(nonatomic, assign) CGFloat offsetY;
@property(nonatomic, assign) CGFloat scale;
@property(nonatomic, assign) BOOL showGrid;
//
-(void)import:(NSDictionary*)data;
-(NSDictionary*)export;
-(void)reset;
//
@property(nonatomic, readonly) NSInteger numChildren;
@property(nonatomic, strong) TMCutterLayer *focusObject;
-(void)setChildIndex:(TMCutterLayer*)child index:(NSInteger)index;
-(NSInteger)getChildIndex:(TMCutterLayer*)child;
-(void)removeChild:(TMCutterLayer*)child;
-(void)addChild:(TMCutterLayer*)child;
//
@property(nonatomic, readonly) NSInteger numUndo;
@property(nonatomic, readonly) NSInteger numRedo;
@property(nonatomic, assign) BOOL change;
-(void)undo;
-(void)redo;
@end